<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <img src="./images/rain.jpg" alt="">
    <script>
        var img = document.querySelector('img');
        var date = new Date();
        var h = date.getHours();
        if(h < 12){
            img.src = './images/girl.jpg';
        }else{
            img.src = './images/rain.jpg';
        }
    </script>
</body>
</html>